<extend name="Public/main"/>

<block name="navs">
    <li class="current">
        <div class="step_inner fl">
            <span class="icon_step">1</span>
            <h4>协议书</h4>
        </div>
    </li>
    <li class="current">
        <div class="step_inner fl">
            <span class="icon_step">2</span>
            <h4>环境检测</h4>
        </div>
    </li>
    <li class="current">
        <div class="step_inner">
            <span class="icon_step">3</span>
            <h4>创建数据库</h4>
        </div>
    </li>
    <li>
        <div class="step_inner fr">
            <span class="icon_step">4</span>
            <h4>
                <eq name="Think.session.update" value="1">升级
                    <else/>
                    安装
                </eq>
            </h4>
        </div>
    </li>
    <li>
        <div class="step_inner fr">
            <span class="icon_step">5</span>
            <h4>完成</h4>
        </div>
    </li>
</block>

<block name="body">
    <?php
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_HOST_M', '127.0.0.1');
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_PORT', '3306');
    ?>
    <h1>创建数据库</h1>
    <form action="__SELF__" method="post" target="_self">
        <div class="step create-database">
            <div class="frm_control_group">
                <label class="frm_label">数据库类型</label>
                <div class="frm_controls">
                    <select class="frm_select" name="db[]">
                        <option>mysql</option>
                    </select>
                    <span class="frm_tips">本系统暂仅支持Mysql数据库</span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">服务器地址</label>
                <div class="frm_controls">
                    <input type="text" name="db[]"
                           value="<defined name='SAE_MYSQL_HOST_M'>{$Think.const.SAE_MYSQL_HOST_M}<else/>127.0.0.1</defined>"
                           class="frm_input"/>
                    <span class="frm_tips">数据库服务器，数据库服务器IP，一般为127.0.0.1</span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">数据库名</label>
                <div class="frm_controls">
                    <input type="text" name="db[]"
                           value="<defined name='SAE_MYSQL_DB'>{$Think.const.SAE_MYSQL_DB}<else/>jccms</defined>"
                           class="frm_input"/>
                    <span class="frm_tips">系统部署所在数据库的名称</span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">数据库用户名</label>
                <div class="frm_controls">
                    <input type="text" name="db[]"
                           value="<defined name='SAE_MYSQL_USER'>{$Think.const.SAE_MYSQL_USER}<else/>root</defined>"
                           class="frm_input"/>
                    <span class="frm_tips">系统部署所在数据库的用户名</span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">数据库密码</label>
                <div class="frm_controls">
                    <input type="text" name="db[]"
                           value="<defined name='SAE_MYSQL_PASS'>{$Think.const.SAE_MYSQL_PASS}<else/>root</defined>"
                           class="frm_input"/>
                    <span class="frm_tips">系统部署所在数据库的密码</span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">数据库端口</label>
                <div class="frm_controls">
                    <input type="text" name="db[]"
                           value="<defined name='SAE_MYSQL_PORT'>{$Think.const.SAE_MYSQL_PORT}<else/>3306</defined>"
                           class="frm_input"/>
                    <span class="frm_tips">数据库端口，数据库服务连接端口，一般为3306</span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">数据表前缀</label>
                <div class="frm_controls">
                    <input type="text" name="db[]" value="jccms_" class="frm_input"/>
                    <span class="frm_tips">数据表前缀，同一个数据库运行多个系统时请修改为不同的前缀</span>
                </div>
            </div>

        </div>
        <h2>创始人帐号信息</h2></br>
        <div class="step create-database">
            <div class="frm_control_group">
                <label class="frm_label">用户名</label>
                <div class="frm_controls">
                    <input type="text" name="admin[]" value="root" class="frm_input"/>
                    <span class="frm_tips"></span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">密码</label>
                <div class="frm_controls">
                    <input type="password" name="admin[]" value="" class="frm_input passwd"/>
                    <span class="frm_tips"></span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">确认密码</label>
                <div class="frm_controls">
                    <input type="password" name="admin[]" value="" class="frm_input passwd2"/>
                    <span class="frm_tips"></span>
                </div>
            </div>
            <div class="frm_control_group">
                <label class="frm_label">邮箱</label>
                <div class="frm_controls">
                    <input type="text" name="admin[]" value="" class="frm_input email"/>
                    <span class="frm_tips">邮箱，请填写正确的邮箱获取最新的软件资讯</span>
                </div>
            </div>
        </div>
    </form>
    <div class="toolBar">
        <a class="btn btn-default" href="{:U('Install/step1')}">上一步</a>
        <button id="nextBtn" type="button" class="btn btn-primary">下一步</button>
    </div>
</block>